package com.qf.xvyinghai02.exhandler;

import com.qf.xvyinghai02.vo.ResultVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExHandler {
    @ExceptionHandler(Exception.class)
    public ResultVo handleEx(Exception e) {
        return ResultVo.fail(e.getMessage());
    }
}
